package cn.yang.mapper;

import cn.yang.domain.Questions;
import cn.yang.domain.vo.QOVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author Administrator
* @description 针对表【questions】的数据库操作Mapper
* @createDate 2025-03-05 13:50:28
* @Entity cn.yang.domain.Questions
*/
public interface QuestionsMapper extends BaseMapper<Questions> {


     @Select("SELECT \n" +
             "    q.id ,\n" +
             "    q.content,\n" +
             "    o.option_label,\n" +
             "    o.option_content\n" +
             "FROM \n" +
             "    questions q\n" +
             "JOIN \n" +
             "    options o ON q.id = o.question_id\n" +
             "ORDER BY \n" +
             "    q.id, o.option_label;\n")
     List<QOVO> getQuestion();
}




